<?php
require_once('conn.inc.php');
@$conn	=	mysql_connect($db_host,$db_user,$db_pwd);
mysql_query("set names 'utf8'");
mysql_select_db($db_name);

@$hid = $_POST['hid'];

@$select	=	"select * from home where hid='$hid' && state=1"; //LIMIT 0,10
$rs		= mysql_query($select);

@$sql2	=	"select*from hometeam where hid='$hid' && state='1'";
$rsql2 = mysql_query($sql2);
$nsql2 = mysql_num_rows($rsql2);

$results = array('ycjrs'=>$nsql2);
while ($xx = mysql_fetch_assoc($rs)) {
	$results['data'][] = $xx;
}
// 将数组转成json格式
echo json_encode($results);
mysql_close();
